﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace CloudTaobao
{
    public partial class WebBrowserPage : PhoneApplicationPage
    {
        private string targetUrl = "";

        public WebBrowserPage()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            targetUrl = this.NavigationContext.QueryString["targetUrl"];
        }

        private void web_Loaded(object sender, RoutedEventArgs e)
        {
            if (targetUrl != "")
            {
                web.Navigate(new Uri(targetUrl));
            }
            else 
            {
                MessageBox.Show("链接错误，请返回");
            }
        }
    }
}